3.3 \(\int \sqrt{a \sin ^2(x)} \, dx\)

Optimal. Leaf size=14 \[ -\cot (x) \sqrt{a \sin ^2(x)} \]

[Out]

-(Cot[x]*Sqrt[a*Sin[x]^2])

________________________________________________________________________________________

Rubi [A]  time = 0.0098667, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {3207, 2638} \[ -\cot (x) \sqrt{a \sin ^2(x)} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a*Sin[x]^2],x]

[Out]

-(Cot[x]*Sqrt[a*Sin[x]^2])

Rule 3207

Int[(u_.)*((b_.)*sin[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Di
st[((b*ff^n)^IntPart[p]*(b*Sin[e + f*x]^n)^FracPart[p])/(Sin[e + f*x]/ff)^(n*FracPart[p]), Int[ActivateTrig[u]
*(Sin[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \sqrt{a \sin ^2(x)} \, dx &=\left (\csc (x) \sqrt{a \sin ^2(x)}\right ) \int \sin (x) \, dx\\ &=-\cot (x) \sqrt{a \sin ^2(x)}\\ \end{align*}

Mathematica [A]  time = 0.0043304, size = 14, normalized size = 1. \[ -\cot (x) \sqrt{a \sin ^2(x)} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a*Sin[x]^2],x]

[Out]

-(Cot[x]*Sqrt[a*Sin[x]^2])

________________________________________________________________________________________

Maple [A]  time = 0.294, size = 16, normalized size = 1.1 \begin{align*} -{a\cos \left ( x \right ) \sin \left ( x \right ){\frac{1}{\sqrt{a \left ( \sin \left ( x \right ) \right ) ^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*sin(x)^2)^(1/2),x)

[Out]

-1/(a*sin(x)^2)^(1/2)*a*cos(x)*sin(x)

________________________________________________________________________________________

Maxima [A]  time = 1.42444, size = 18, normalized size = 1.29 \begin{align*} -\frac{\sqrt{a}}{\sqrt{\tan \left (x\right )^{2} + 1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*sin(x)^2)^(1/2),x, algorithm="maxima")

[Out]

-sqrt(a)/sqrt(tan(x)^2 + 1)

________________________________________________________________________________________

Fricas [A]  time = 1.5783, size = 51, normalized size = 3.64 \begin{align*} -\frac{\sqrt{-a \cos \left (x\right )^{2} + a} \cos \left (x\right )}{\sin \left (x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*sin(x)^2)^(1/2),x, algorithm="fricas")

[Out]

-sqrt(-a*cos(x)^2 + a)*cos(x)/sin(x)

________________________________________________________________________________________

Sympy [A]  time = 0.719972, size = 20, normalized size = 1.43 \begin{align*} - \frac{\sqrt{a} \sqrt{\sin ^{2}{\left (x \right )}} \cos{\left (x \right )}}{\sin{\left (x \right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*sin(x)**2)**(1/2),x)

[Out]

-sqrt(a)*sqrt(sin(x)**2)*cos(x)/sin(x)

________________________________________________________________________________________

Giac [A]  time = 1.24183, size = 23, normalized size = 1.64 \begin{align*} -{\left (\cos \left (x\right ) \mathrm{sgn}\left (\sin \left (x\right )\right ) - \mathrm{sgn}\left (\sin \left (x\right )\right )\right )} \sqrt{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*sin(x)^2)^(1/2),x, algorithm="giac")

[Out]

-(cos(x)*sgn(sin(x)) - sgn(sin(x)))*sqrt(a)